1. Technical Field
The present invention relates generally to an apparatus and method for calculating a Transmission Control Protocol (TCP) checksum and, more particularly, to technology that can improve a procedure for calculating a checksum of a TCP segment, which is required to efficiently transmit static content in a TCP-based communication network, without requiring exclusive hardware.
2. Description of the Related Art
Computer networks including the Internet occupy such a large part of modern information and communication society that it is impossible to imagine society without computer networks. Recently, the amount of data, such as that of social network service (SNS), stock trading markets, and web pages, has explosively increased. In order to process such increased data, a neologism “big data” has appeared, and research into a series of methods for storing, treating, processing, and training a large amount of data with the appearance of “big data” has been conducted.
Among computer network protocols, Transmission Control Protocol/Internet Protocol (TCP/IP) has become the basis of a large number of protocols including a Hypertext Transfer Protocol (HTTP) web protocol, a File Transfer Protocol (FTP), a Simple Mail Transfer Protocol (SMTP), etc., and thus it is very important to improve a TCP/IP communication protocol transmission procedure. However, the transmission of data using the TCP/IP communication protocol includes a large number of calculation procedures. First, in case of wired internet frame-based transmission for Ethernet transmission is required and in case of wireless internet corresponding physical and data link layer transmissions are required, and the fragmentation of an IP packet into a header and data to be transmitted is required for IP transmission. Further, the configuration of a header and data to be transmitted for a TCP segment is required for TCP transmission. Furthermore, in TCP, 16-bit checksum calculation must be performed on a TCP header and data to be transmitted for each of all TCP segments to be transmitted, and such calculation may be a burden on a Central Processing Unit (CPU) and may influence a transfer rate.
As such, exclusive hardware for exclusively performing a TCP/IP transmission procedure was developed, and then a TCP Offload Engine (TOE), intending to reduce a burden on the CPU in a TCP/IP transmission procedure, was developed and is currently used. Such a TOE supports all of TCP/IP protocol stacks or performs functions of a part of the stacks, such as calculating checksums, using exclusive hardware. A network driver transmits desired data to a Network Interface Card (NIC) using a Direct Memory Access (DMA) function, and the NIC configures TCP/IP segments/packets from the received data using exclusive hardware and transfers the TCP/IP segments/packets. A procedure for receiving data from other computers is similar to this procedure.
However, such a hardware-based TOE is not always adopted. The reason for this is that an NIC equipped with a TOE function has the disadvantage of being expensive, and a Linux kernel does not support TOE hardware. Further, TOE hardware has security vulnerabilities, and is problematic in that the buffering of data becomes more and more serious due to the restriction in the processing ability of a TOE chip. Furthermore, there are problems in that a TOE causes many changes in a Linux kernel, TOE hardware is not standardized, and the lifespan of a TOE NIC becomes short due to rapid improvements in the performance of system hardware. In relation to this, Korean Patent Application Publication No. 10-2005-0060298 discloses a checksum generation apparatus and method.